package com.shop.om.sysUser.rest;

import com.jt.common.response.R;
import com.shop.om.base.BaseRest;
import com.shop.om.model.sysUser.SysMenuEntity;
import com.shop.om.sysUser.service.SysMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author cjt
 * @version 1.0.0
 * @description
 * @date 2020/7/14  10:47
 * @Version v1.0
 **/
@RestController
@RequestMapping("/sys/menu")
public class SysMenuRest extends BaseRest {
    @Resource
    private SysMenuService sysMenuService;

    /**
     * 用户菜单列表
     * @return
     */
    @GetMapping("/userMenu")
    public R userMenu(){
        List<SysMenuEntity> menuList = sysMenuService.getUserMenuList(getUserId());
        return R.ok(menuList);
    }

}
